Skip to content

Conversation

@beatlevic
Copy link
Collaborator

Added ghost context provider that retrieves all relevant context in a comment wrapped style.

Adds the comment wrapped code to the QUERY prompt.

@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

⚠️ No Changeset found

Latest commit: e11c18e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@beatlevic beatlevic requested a review from markijbema November 5, 2025 07:36
Copy link
Contributor

@markijbema markijbema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect there to be code to register/deregister the ContextRetrievalService. So either it does it itself, but in that case there is some missing teardown code, or it doesnt, in which case it will always give an empty result.

Either way, even with that this does look way simpler than expected! Very cool

@beatlevic beatlevic marked this pull request as ready for review November 6, 2025 14:42
const filepathUri = filepath.startsWith("file://") ? filepath : vscode.Uri.file(filepath).toString()

// Initialize import definitions cache
await this.contextService.initializeForFile(filepathUri)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesnt seem thread safe; we can have multiple requests in flight, and then we initialize it for one file but by the time we create the snippetPayload it might have already been changed to another file

// Convert all snippet filepaths to URIs
const snippetsWithUris = filteredSnippets.map((snippet: any) => ({
...snippet,
filepath: snippet.filepath?.startsWith("file://")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, why do we have this in two different formats; is this a real thing or just llm slop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants